package com.woniuxy.store.client;

import com.woniuxy.store.client.param.AddBalanceParam;
import com.woniuxy.store.client.param.WithdrawParam;
import com.woniuxy.store.client.result.WalletDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "storeWalletClient",name="store",path="/store/withdraw")
public interface StoreWalletClient {

    @GetMapping("/wallet")
    public Result<WalletDto> getWallet();

    @PutMapping("/addBalance")
    public Result addBalance(@RequestBody AddBalanceParam param);

    @PutMapping("/withdraw")
    public Result withdraw(@RequestBody WithdrawParam param);

}
